<template>
	<view>
		<view class="relocation-content">
			<view class="relo-header">
				<slot>111</slot>
			</view>
			<view class="relo-text">
				<uni-forms class="form-swiper" :label-width="70">
					<uni-forms-item v-for="item in formData.itemForm" :key="item.id" :label="item.name">
						<uni-easyinput v-model="item.id" disabled></uni-easyinput>
					</uni-forms-item>
				</uni-forms>
			</view>
			<uni-pagination :show-icon="true" :total="50" title="标题文字" />
		</view>
	</view>
</template>

<script>
	import {
		purchaseSearch
	} from '@/api/request.js'
	export default {
		name: 'rf-form',
		props: {
			formData: {
				type: Object,
				require: true
			}
		},
		data() {
			return {
				listData: {

				}
			};
		},
		onLoad(args) {
			this.query()
		},
		methods: {

			query() {

			},
			scanClick(e) {
				this.$emit('scanClick', e)
			},
			modelFun(id) {

			},
			//动态设置swiper的高度
			setSwiperHeight() {
				let query = uni.createSelectorQuery().in(this);
				query.select('.form-swiper').boundingClientRect();
				query.exec((res) => {
					if (res && res[0]) {
						this.swiperHeight = res[0].height;
					}
				});
			},
		}
	}
</script>

<style lang="scss">
	.relocation-content {
		margin-top: 50px;

		.relo-header {
			padding: 20px;
			// width: 300px;
			display: flex;
			align-items: center;
			margin: 0 auto;

			uni-text {
				margin-right: 10px;
			}
		}

		.relo-text {
			// margin-top: 20px;
			height: 300px;
			padding: 15px;
			border: 1px solid #cddef0;
			border-radius: 10px;
			margin: 10px;
		}

		.uni-forms {
			// width: 300px;
			width: calc(100% - 20px);
			max-height: 300px;
			overflow-y: auto;
			margin: 0 auto;
		}
	}
</style>